﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace ConsoleApp1.DbCustom.Models
{
    [Index(nameof(Name), nameof(JobGroup), Name = "AK_KEY_2_Sys_Job", IsUnique = true)]
    [Index(nameof(Name), Name = "Index_1")]
    public partial class Sys_Job
    {
        [Key]
        [StringLength(36)]
        [Unicode(false)]
        public string Id { get; set; } = null!;
        [StringLength(50)]
        public string Name { get; set; } = null!;
        [StringLength(50)]
        public string JobGroup { get; set; } = null!;
        [StringLength(200)]
        public string? Description { get; set; }
        [StringLength(100)]
        [Unicode(false)]
        public string CronExpression { get; set; } = null!;
        [Column(TypeName = "datetime")]
        public DateTime? LastTime { get; set; }
        public int RedundancyMinute { get; set; }
        public bool IsActive { get; set; }
        [StringLength(255)]
        public string? ApiUrl { get; set; }
        [StringLength(36)]
        [Unicode(false)]
        public string? CreatedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? CreatedTime { get; set; }
        [StringLength(36)]
        [Unicode(false)]
        public string? LastModifiedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? LastModifiedTime { get; set; }
    }
}
